#include<iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int max = 0;
    int a;
    for(int i = 0;i < n ;i++)
    {
        cin >> a;
        if(a>max)
        {
            max = a;
        }
    }
    cout << max << endl;
    return 0;
}